# CMakeList for DENSO PC
cmake_minimum_required(VERSION 2.8)
project( VelCtrl ) 


#set(OpenCV_DIR "D:/opencv/build")
set(OpenCV_DIR "D:/Documents and Settings/SonLe/My Documents/SOFTs/OpenCV-2.4.2/opencv/build/")

find_package( OpenCV REQUIRED core highgui imgproc objdetect calib3d features2d ml flann nonfree video contrib gpu legacy photo ts stitching)


# check finding
IF (OpenCV_FOUND)
message("OpenCV is found\n")
ELSE (OpenCV_FOUND)
message("OpenCV is NOT found\n")
ENDIF (OpenCV_FOUND)


include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${OpenCV_LIB_DIR})


message("OpenCV_LIB_DIR = ${OpenCV_LIB_DIR}")
message("OpenCV_INCLUDE_DIRS = ${OpenCV_INCLUDE_DIRS}")
message("OpenCV_DIR = ${OpenCV_DIR}")
message("OpenCV_LIBS = ${OpenCV_LIBS}")

add_executable( VelCtrl main_velctrl.cpp DENSOrobot.cpp MatWork.cpp  RS232.cpp Serial.cpp )

target_link_libraries( VelCtrl ${OpenCV_LIBS} )

